package com.qf.common.exception;


import com.qf.common.common.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {
    @ExceptionHandler(Exception.class)
    public R handlerException(Exception e) {
        System.out.println("全局异常处理器执行");
        e.printStackTrace();
        return R.fail(500, e.getMessage());
    }
}
